home *** CD-ROM | disk | FTP | other *** search
- <%
- On Error Resume Next
- ruleName = Request.ReqParam("rule")
- if( ruleName = "" ) then
- nou = True
- else
- nou = False
- action = Request.ReqParam("action")
- if( action = "" ) then
- Set rule = Rules.item(ruleName)
- else
- if( action = "Remove" ) then
- Set rule = Rules.item(ruleName)
- rule.Remove
- Response.Redirect("/rules/managerules.agp")
- end if
- if( action = "Commit" ) then
- Set rule = Rules.NewRule
- rule.Name = ruleName
- rule.Commit
- Response.Redirect("/rules/rule.agp?rule=" + ruleName)
- end if
- end if
- end if
- %>
- <html>
- <head>
- <meta NAME="Author,Design" Content="GateKeeper Team; gatekeeper@infopulse.net">
- <meta NAME="Copyright" Content="Infopulse; www.infopulse.net">
- <title>Empty</title>
- </head>
-
- <body bgcolor="#FFFFFF" text="#000000">
- <%
- if nou = False then
- Set Users = Accounts.Users
- On Error Resume Next
- Set user = Users.item( ruleName )
- If Not Err.Number = 0 Then
- szType = "group"
- Err.Number = 0
- else
- szType = "user"
- End If
- %>
- <p><big><strong><font face="Arial">
- Rules for <%Response.Write(szType)%> <%Response.Write(ruleName)%>
- </font></strong></big></p>
- <%
- End if
- %>
-
- <%
- if Not Err.Number = 0 Then
- Response.Write("<B><FONT COLOR=""#FF0000"">" & Err.Description & ": " & ruleName & "</FONT></B><br>")
- end if
- %>
- <%
- if nou = False then
- %>
-
- <div>
- <table border="1" cellpadding="0" cellspacing="0" width="60%">
- <tr>
- <td width="40%" bgcolor="#183159"><strong><font face="Arial" color="#FFFFFF">
- Time scheduling on protocols
- </font></strong></td>
- </tr>
- <%
- for i = 1 to rule.CountProtocols
- protName = rule.GetProtocolName(i)
- link = "<a href=""protocoledit.agp?rule=" & ruleName & "&protocol=" & protName & """>" & protName & "</a>"
- %>
- <tr>
- <td width="50%"><font face="Arial">
-
- <%Response.Write(link)%>
- <font></td>
- </tr>
- <%
- next
- %>
- </table></div>
- <font face="Arial">
- <%
- link = "<a href=""protocoledit.agp?rule=" & ruleName & """>Add new time scheduling rule</a>"
- Response.Write(link)
- %>
- </font>
- <p>
- <hr width="60%" align="left">
- <br>
- <div>
- <table border="1" cellpadding="0" cellspacing="0" width="60%">
- <tr>
- <%
- if rule.SitesPermitted then
- msg = "All sites are DENIED, excepting these:"
- else
- msg = "All sites are ALLOWED, excepting these:"
- end if
- %>
- <td width="50%" bgcolor="#183159"><strong><font face="Arial" color="#FFFFFF">
- <%Response.Write(msg)%>
- </font></strong></td>
- </tr>
- <%
- for i = 1 to rule.CountSites
- site = rule.GetSite(i)
- link = "<a href=""siteedit.agp?rule=" & ruleName & "&site=" & site & """>" & site & "</a>"
- %>
- <tr>
- <td width="50%"><font face="Arial">
-
- <%Response.Write(link)%>
- </font></td>
- </tr>
- <%
- next
- %>
- </table></div>
- <font face="Arial">
- <a href="siteedit.agp?rule=<%Response.Write(ruleName)%>">Add new site</a>
- <form method="POST" action= "siteedit.agp">
- Press this button to
- <input type="hidden" name="rule" value="<%Response.Write(ruleName)%>">
- <%
- if rule.SitesPermitted then
- %>
- <input type="submit" name="action" value="Allow">
- <%
- else
- %>
- <input type="submit" name="action" value="Deny">
- <%
- end if
- %>
- access to all sites except those listed above.
- </form>
-
- </font>
- <p>
- <hr width="60%" align="left">
- <form method="POST" action= "/rules/rule.agp">
- <input type="hidden" name="rule" value="<%Response.Write(ruleName)%>">
- <font face="Arial">Press
- <input type="submit" name="action" value="Remove">
- in order to delete all of the rules for this user/group.</font>
- <%
- else
- sType = Request.ReqParam("type")
- %>
- <p><big><strong><font face="Arial">Add rule</font></strong></big></p>
-
- <form method="POST" action= "/rules/rule.agp">
- <div>
- <table border="1" cellpadding="0" cellspacing="0" width="60%">
- <tr>
- <td width="50%" bgcolor="#183159"><strong><font face="Arial" color="#FFFFFF">
- Option
- </font></strong></td>
- <td width="50%" bgcolor="#183159"><strong><font face="Arial" color="#FFFFFF">
- Value
- </font></strong></td>
- </tr>
- <tr>
- <td width="50%"><strong><font face="Arial">
- for <%Response.Write(sType)%>:
- </font></strong></td>
- <td width="50%">
-
- <select name="rule" size="1">
- <%
- if sType = "group" Then
- Set tmpObj = Accounts.groups
- Else
- Set tmpObj = Accounts.users
- End if
- for i = 1 to tmpObj.count
- Set tmpObj2 = tmpObj.item(i)
- %>
- <option value="<%Response.Write(tmpObj2.Name)%>"><%Response.Write(tmpObj2.Name)%></option>
- <%
- next
- %>
- </select>
- </td>
- </tr>
- </table></div>
- <br>
- <%
- nr = tmpObj.count
- if nr > 0 Then
- %>
- <input type="submit" name="action" value="Commit">
- <%
- Else
- %>
- <font face="Arial">
- <%
- Response.Write("There are no groups defined")
- %>
- </font>
- <%
- End if
- %>
- </form>
- <%
- end if
- %>
- <br>
- <br>
- <font size="1" face="Arial"><%Response.Write(GateKeeper.Version)%></font>
- <br>
- </body>
- </html>
-